package com.bw.visitor.net

import com.bw.base.constants.ApiConst
import com.bw.http.utils.Res
import com.bw.visitor.entity.VisitorEntity
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path

interface ApiService {

    @GET(ApiConst.URL_GET_VISITOR)
    suspend fun getVisitor(): Res<List<VisitorEntity>>

    @POST(ApiConst.URL_POSH_ADD_VISITOR)
    suspend fun addVisitor(@Body visitorEntity: VisitorEntity): Res<VisitorEntity>

    @DELETE(ApiConst.URL_DELETE_VISITOR)
    suspend fun deleteVisitor(@Path("id") id: Int):Res<String>

}